import { ref } from 'vue';
import { defineStore } from 'pinia';

export const useUserStore = defineStore('userStore', () => {
  const currentUser = ref();

  function setCurrentUser(obj: any) {
    currentUser.value = obj;
  }

  function clearCurrentUser() {
    currentUser.value = undefined;
  }

  return { setCurrentUser, clearCurrentUser, currentUser };
});
